package com.uni.domain;

import java.util.HashSet;
import java.util.Set;

public class Group extends Identifier {

    private String name;
    private String year;
    private Set<User> students = new HashSet<User>();

    public Set<User> getStudents() {
        return students;
    }

    public void setStudents(Set<User> students) {
        this.students = students;
    }

    public Group() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    @Override
    public String toString(){
        return name + "(" + year + ")";
    }
    
    @Override
    public boolean equals(Object o){
    	if(o instanceof Group){
	    	Group g = (Group)o;
	    	return getId().equals(g.getId());
    	} 
    	return false;
    }

}
